#!/bin/bash
#
# clandestine.googlecode.com
#
readonly ATF="0.1.2 (rocket fuel)"
readonly VERSION_FORMAT='%i.%i.%i (%s)'
# functions
function TestStart () {
	echo -n "[`printf \"%5i\" \"$SECONDS\"`] $@... "
}
function TestPassed () {
	local DESC=""
	(( $# )) && DESC=": $@"
	echo "${COLF_GREEN}PASSED${COLR}${DESC}."
}
function TestFailed () {
	local DESC=""
	(( $# )) && DESC=": $@"
	echo "${COLF_RED}FAILED${COLR}${DESC}."
}
# Init
TestStart "libclandestine automated check facility is starting"
	if ! source "libclandestine.bash" 2> /dev/null; then
		TestFailed "can't source the lib"
		exit 1
	fi
	if [[ "`printf "$VERSION_FORMAT" "${LIBCLANDESTINE[@]}"`" != "$ATF" ]]; then
		TestFailed "version mismatch"
		exit 1
	fi
TestPassed "using version $ATF"
TestStart "generating the test variables"
	declare -- TSTR="wtf?"
	declare -i TINT=666
	declare -a TARR=( [14]="$TSTR" [88]="$TINT" )
	declare -- T64K=$(dd if=/dev/urandom bs=64k count=1 status=noxfer 2> /dev/null)
TestPassed
